package com.sky.controller.user;

import com.sky.controller.admin.AdminShopController;
import com.sky.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/user/shop")
@RestController
public class UserShopController {
    @Autowired
    private RedisTemplate redisTemplate;

    @GetMapping("/status")
    public Result getShop(){
        Integer status = (Integer) redisTemplate.opsForValue().get(AdminShopController.KEY);
        System.out.println(status);
return Result.success(status);
    }

}
